<template>
  <el-card class="au-bpmn aurora-model">
    <bpmn-design />
    <bpmn-panel class="process-panel" />
  </el-card>
</template>

<script>
import BpmnDesign from './BpmnDesign'
import BpmnPanel from './BpmnPanel'
export default {
  name: "LabBpmn",
  components: { BpmnPanel, BpmnDesign },
  provide() {
    return {
      bpmn: this.bpmn
    }
  },
  props: {
    processInfo: {
      type: Object,
      default: function () {
        return { processDefId: this.$Util.uuid(4), processContent: ''}
      }
    }
  },
  data() {
    return {
      bpmn: {
        modeler: null, elementRegistry: undefined, bpmnElement: {}, bpmnId: undefined, bpmnType: 'Process', bpmnData: {},
        defData: {
          id: '', name: '',
          node: { nodeType: 'user', nodeRole: 'none', todoFormat: '', flowLayout: '', todoLayout: '' },
          form: { viewId: '', version: 2 },
          seq: { },
          event: {},
          assign: { nodeAssign: 'single', assigns: [] }
        }
      }
    }
  },
  mounted() {
    this.$Util.copyAttr(this.processInfo, this.bpmn.bpmnData, null, this)
  }
}
</script>

<style scoped>

</style>
